<%--
 * 
 * @author yangxc
--%>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fun" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE HTML>
<html>
<head>
    <title>client_details</title>

    <style>
        .list-group li:hover {
            background-color: #f9f9f9;
        }
    </style>
</head>
<body>
<br/>
<div class="row">
    <div class="col-md-10">
        <h3>使用说明</h3>
    </div>
    <div class="col-md-2">
        <div class="pull-right">
            <a href="clients/register" class="btn btn-success btn-sm">注册client</a>
            <a href="clients/manage" class="btn btn-success btn-sm">管理client</a>
        </div>
    </div>
</div>
<div>
    <div ng-app>

        <h2>Test</h2>

        <p>

        </p>

        <div ng-controller="TestClientCtrl">

                <div class="panel panel-default">
                    <div class="panel-heading">authorization_code</div>
                    <div class="panel-body">
                        <p class="text-muted"></p>
                        <ol>
                            <li>
                                <p>
                                    <code>获取 'code'</code>
                                    <br/>
                                    <div>${contextPath}/oauth/authorize?client_id={{clientId}}&redirect_uri={{redirectUri}}&response_type=code</div>

                                </p>
                            </li>
                            <li>
                                <code>用 'code' 换取 'access_token'</code>
                                <br/>
                                <div>${contextPath}/oauth/token?client_id={{clientId}}&client_secret={{clientSecret}}&grant_type=authorization_code&code={{code}}&redirect_uri={{redirectUri}}</div>

                            </li>
                        </ol>
                    </div>
                </div>

                <div class="panel panel-default">
                    <div class="panel-heading">implicit</div>
                    <div class="panel-body">
                        <p class="text-muted">替换redirect_uri 后复制链接地址. 获取access_token后注意查看redirect_uri的hash部分(#号后边部分)</p>
                        <p>
                            <div>${contextPath}/oauth/authorize?client_id={{clientId}}&client_secret={{clientSecret}}&response_type=token&redirect_uri={{implicitRedirectUri}}</div>

                        </p>
                    </div>
                </div>



                <div class="panel panel-default">
                    <div class="panel-heading">client_credentials</div>
                    <div class="panel-body">
                        <p class="text-muted">复制地址替换参数即可测试</p>

                        <div>${contextPath}/oauth/token?client_id={{clientId}}&client_secret={{clientSecret}}&grant_type=client_credentials</div>
                    </div>
                </div>

        </div>
    </div>


</div>
</body>
</html>